package com.googlecode.quillen.service;

import com.googlecode.quillen.domain.Chunk;
import com.googlecode.quillen.domain.ObjectStorageException;
import com.googlecode.quillen.domain.AttributeStorageException;

import java.security.NoSuchAlgorithmException;
import java.io.IOException;
import java.util.Collection;

/**
 * Created by IntelliJ IDEA.
 * User: greg
 * Date: Dec 8, 2008
 * Time: 7:26:58 PM
 */
public interface ChunkService
{
    void createStorage() throws AttributeStorageException, ObjectStorageException;

    void deleteStorage() throws AttributeStorageException, ObjectStorageException;

    Chunk get(String chunkKey) throws ObjectStorageException, NoSuchAlgorithmException, IOException;

    void put(String shadowKey, Chunk chunk) throws ObjectStorageException, AttributeStorageException, IOException;

    boolean delete(String chunkKey, Collection<String> shadowKeys) throws ObjectStorageException, AttributeStorageException;
}
